//
//  MainRootViewController.m
//  searchTest
//
//  Created by mac on 15/10/27.
//  Copyright © 2015年 mac. All rights reserved.
//

#import "MainRootViewController.h"
#import "firstViewController.h"
@interface MainRootViewController ()

@end

@implementation MainRootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.titleView.backgroundColor=[UIColor redColor];
    NSLog(@"%@",self.navigationItem.titleView);
    UIView *view=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 400, 33)];
    view.backgroundColor=[UIColor redColor];
    self.navigationItem.titleView=view;
    
    
    UIButton *btn=[[UIButton alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];
    btn.backgroundColor=[UIColor yellowColor];
    [btn addTarget:self action:@selector(toucheClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    // Do any additional setup after loading the view.
}
-(void)toucheClick{
    firstViewController *firstCtl=[[firstViewController alloc]init];
    [self.navigationController pushViewController:firstCtl animated:NO];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
